//
// Created by 11510 on 2024/6/8.
//
#include <unistd.h>
#include <iostream>
#include <fstream>
using std::cin;
using std::cerr;
using std::cout;
using std::endl;
using std::ifstream;
using std::string;

void test0(){
    ifstream ifs;
    ifs.open("main.cpp");
    ifs.clear();

    if(!ifs){
        cerr << "ifstream open file failed" << endl;
    }

    string word;
    while(ifs >> word){
        cout << word << endl;
    }
}


int main() {
    test0();
    return 0;
}